package se.zens.demo.wsapp.interfaces.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.xml.bind.annotation.XmlType;
/**
 * Exchange rate model object
 */
@XmlType
public class ExchangeRate implements Serializable
{
	private String fromCurrency;
	private String toCurrency;
	private BigDecimal rate;
	private Date lastUpdate;
	
	public ExchangeRate()
	{
		super();
	
	}
	public ExchangeRate(String currencyFrom, String currencyTo,
			BigDecimal rate, Date lastUpdate)
	{
		super();
		this.fromCurrency = currencyFrom;
		this.toCurrency = currencyTo;
		this.rate = rate;
		this.lastUpdate = lastUpdate;
	}

	
	public String getFromCurrency()
	{
		return fromCurrency;
	}
	public void setFromCurrency(String fromCurrency)
	{
		this.fromCurrency = fromCurrency;
	}
	public String getToCurrency()
	{
		return toCurrency;
	}
	public void setToCurrency(String toCurrency)
	{
		this.toCurrency = toCurrency;
	}
	public BigDecimal getRate()
	{
		return rate;
	}

	public void setRate(BigDecimal rate)
	{
		this.rate = rate;
	}

	public Date getLastUpdate()
	{
		return lastUpdate;
	}

	public void setLastUpdate(Date lastUpdate)
	{
		this.lastUpdate = lastUpdate;
	}
	@Override
	public String toString()
	{
		return "ExchangeRate [fromCurrency=" + fromCurrency + ", toCurrency="
				+ toCurrency + ", rate=" + rate + ", lastUpdate=" + lastUpdate
				+ "]";
	}

}
